Sound Sample Description
The sound sample description contains information that defines how to interpret sound media data. This sample description is based on the standard sample description header, as described in
"Sample Table Atoms"
.
The data format field contains the format of the audio data.
Table 0-8
shows some of the current formats.
Table 8
Sound data format types
Data format
|
Description
|
'raw '
|
Samples are stored uncompressed in offset-binary format (values range from 0 to 255; 128 is silence).
|
'twos'
|
Samples are stored uncompressed, in twos-complement format (sample values range from -128 to 127 for 8-bit audio, and -32768 to 32767 for 1- bit audio; 0 is always silence).
|
'MAC3'
|
Samples have been compressed using MACE 3:1.
|
'MAC6'
|
Samples have been compressed using MACE 6:1.
|
'ima4'
|
Samples have been compressed using IMA 4:1.
|
'law'
|
Samples have been compressed using Law 2:1.
|
The sound media handler also adds some of its own fields to the sample description. For more information about each of these fields, see Inside Macintosh: QuickTime.
-
Version
-
A 16-bit integer that must be set to 0.
-
Revision level
-
A 16-bit integer that must be set to 0.
-
Vendor
-
A 32-bit integer that must be set to 0.
-
Number of channels
-
A 16-bit integer that indicates the number of sound channels used by the sound sample. Set this field to 1 for monaural sounds; set it to 2 for stereo sounds.
-
Sample size
-
A 16-bit integer that specifies the number of bits in each uncompressed sound sample. Set this field to 8 for 8-bit sound and to 16 for 16-bit sound. Sound stored in
'twos'
format may contain 32-bit samples.
-
Compression ID
-
A 16-bit integer that must be set to 0.
-
Packet size
-
A 16-bit integer that must be set to 0.
-
Sample rate
-
A 32-bit unsigned fixed-point number that indicates the rate at which the sound samples were obtained. This number should match the media's time scale.
© 1997 Apple Computer, Inc.| Previous | Chapter contents | Chapter top | Next |